async def gen_success_resp(data):
    return {
        "error": {"code": 0, "message": ""},
        "data": data,
    }


async def gen_fail_resp():
    return {
        "error": {"code": 0, "message": ""},
    }


async def gen_success_resp_have_count(key, items, **kwargs):
    return {
        "error": {"code": 0, "message": ""},
        "data": {key: items, "count": len(items)} | kwargs,
    }


def format_open_number(open_number: str) -> str:
    """
    格式化开奖号码，去除逗号和空格
    :param open_number:
    :return:
    """
    if not open_number:
        return ""
    return open_number.replace(",", "").replace(" ", "")
